{ Google Code Jam 2011. Qualification Round.
  Problemset: http://code.google.com/codejam/contest/dashboard?c=975485#
  Problem C
  Verdict: Correct/Correct
}
uses SysUtils, Math;
var 
	i,j,n,t,r,sm,m,k:longint;
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(t);
for i:=1 to t do begin
	read(n);
	sm:=0;
	r:=0;
	m:=maxlongint;
	for j:=1 to n do begin
		read(k);
		r:=r xor k;
		m:=min(m,k);
		inc(sm,k);
	end;
	write('Case #',i,': ');
	if r=0 then writeln(sm-m) else writeln('NO');
end;
end.